package com.bto.solar.work.constant;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * 通用常量信息
 *
 * @author ruoyi
 */
public class Constants
{
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * www主域
     */
    public static final String WWW = "www.";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功状态
     */
    public static final String LOGIN_SUCCESS_STATUS = "0";

    /**
     * 登录失败状态
     */
    public static final String LOGIN_FAIL_STATUS = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.ruoyi.common.core.utils.file" };



    public static final String HEADER_USER_ID = "uid";

    /**
     * 登陆方式： 密码  短信
     */
    public static final String AUTH_TYPE_PWD = "password";
    public static final String AUTH_TYPE_SMS = "sms";
    public static final List<String> ALLOW_AUTH_TYPES = Arrays.asList(AUTH_TYPE_PWD, AUTH_TYPE_SMS);

    /**
     * 地区表的Redis的key
     */
    public static final String AREA_KEY = "bto:solar-order:AREA_KEY";


    /**
     * 密码长度为6
     */
    public static final int PASSWORD_LENGTH = 6;



    /**-------------------------redis-----------------------**/
    public static final String REDIS_PREFIX = "bto:solar-order:";

    /**
     * 订单锁。防止抖动重复提交订单
     */
    public static final String ORDER_LOCK = REDIS_PREFIX+ "order-lock:";

    /**
     * 法大大 token 缓存
     */
    public static final String FDD_TOKEN = REDIS_PREFIX+ "fdd-token:";

    /**
     * 越秀 token 缓存
     */
    public static final String LEASE_TOKEN = REDIS_PREFIX+ "lease-token:";

    /**
     * 修改密码短信 缓存
     */
    public static final String SMS_CODE_PASSWORD_KEY = "bto:solar-order:code:PASSWORD:";


    /**-------------------------修改密码类型-----------------------**/
    public static final String ORIGIN_PASSWORD = "ORIGIN_PASSWORD";

    public static final String SMS_PASSWORD = "SMS_PASSWORD";

    /**-------------------------验证码类型-----------------------**/
    public static final String LOGIN = "LOGIN";

    public static final String PASSWORD = "PASSWORD";


    /**-------------------------审核类型-----------------------**/
    public static final String APPROVAL_INNER = "APPROVAL_INNER";
    public static final String APPROVAL_BTO = "APPROVAL_BTO";
    public static final String APPROVAL_LEASE = "APPROVAL_LEASE";


    /**-------------------------审核结果关键字-----------------------**/
    public static final String PASS = "PASS";
    public static final String REJECT = "REJECT";
    public static final String TERMINATE = "TERMINATE";
    public static final String LEASE = "LEASE";



    public static final String APPROVAL = "APPROVAL";
    public static final String WAITING_APPROVAL = "WAITING_APPROVAL";

    /**-------------------------特殊状态-----------------------**/

    public  static List<String> SPECIAL_STATES = Arrays.asList(
            BizTaskStateEnum.TERMINATE.getStateId() ,
            BizTaskStateEnum.FINISHED.getStateId() ,
            BizTaskStateEnum.LOCK.getStateId());


    /**-------------------------设备类型-----------------------**/

    public static final String DEVICE_TYPE_ZUJIAN = "ZUJIAN";
    public static final String DEVICE_TYPE_NBQ = "NBQ";
    public static final String DEVICE_TYPE_CJQ = "CJQ";
    public static final String DEVICE_TYPE_PDX = "PDX";
    public static final String DEVICE_TYPE_ZLDL = "ZLDL";
    public static final String DEVICE_TYPE_ZHIJIA = "ZHIJIA";


    //越秀要求校验的设备类型
    public static final List<String> LEASE_NEED_VALID_DEV = Arrays.asList(DEVICE_TYPE_ZUJIAN , DEVICE_TYPE_NBQ);
    public static final List<String> NEED_VALID_CODE_DEV = Arrays.asList(DEVICE_TYPE_ZUJIAN , DEVICE_TYPE_NBQ , DEVICE_TYPE_CJQ , DEVICE_TYPE_PDX);



    /**-------------------------fasc 法大大-----------------------**/
    /**
     控件类型。目前主要有二类控件：
     1)签章控件：
     person_sign: 个人签名
     corp_seal: 企业印章
     corp_seal_cross_page：企业骑缝章
     date_sign: 日期戳
     remark_sign：备注区
     2)填写控件：
     text_single_line: 单行文本
     text_multi_line: 多行文本
     number：数字控件
     id_card：身份证号控件
     fill_date：填写日期控件
     multi_radio：单选框-多项控件
     multi_checkbox：复选框-多项控件
     picture：图片
     select_box: 下拉选择项
     table：表格
     */

    public static final String FDD_OK = "100000";

    public static final String FDD_FIELD_MULTI_CHECKBOX = "multi_checkbox";

    /**
    * 身份证控件类型
    */
    public static final String FDD_FIELD_TYPE_IC_CARD = "id_card";


    /**
     * 复选框--其他证件类型选择
     */
    public static final String FDD_FIELD_NAME = "证件类型选择";

    /**
     * 个人签名
     */
    public static final String PERSON_SIGN = "person_sign";

    /**
     *  企业印章
     */
    public static final String CORP_SEAL = "corp_seal";

    /**
     * 企业骑缝章
     */
    public static final String CORP_SEAL_CROSS_PAGE = "corp_seal_cross_page";

    /**
     * 日期戳
     */
    public static final String DATE_SIGN = "date_sign";

    /**
     * 备注区
     */
    public static final String REMARK_SIGN = "remark_sign";



    /**
    * 签署类型的控件
    */
    public static final List<String> QZKJ_LIST = Arrays.asList(
            PERSON_SIGN,
            CORP_SEAL,
            CORP_SEAL_CROSS_PAGE,
            DATE_SIGN,
            REMARK_SIGN);

    public static final String SIGNTASKSUBJECT_QY = "个人信息使用授权";


    /**-------------------------越秀资料推送关键字-----------------------**/
    /**
     *  信息使用授权书 -- 预审信息
     */
    public static final String FILE_XXSYSQS_A = "XXSYSQS_A";

    /**
     *  信息使用授权书 -- 风险
     */
    public static final String FILE_XXSYSQS_B = "XXSYSQS_B";

    /**
     * 身份证照片
     */
    public static final String FILE_SFZ = "SFZ";

    /**
     * 银行卡照片
     */
    public static final String FILE_YHK = "YHK";


    /**
     * 保险单照片
     */
    public static final String FILE_BXD = "BXD";

    /**
     * 房屋外部
     */
    public static final String FILE_FWWB = "FWWB";

    /**
     * 房屋内部
     */
    public static final String FILE_FWNB = "FWNB";

    /**
     * 设计资料
     */
    public static final String FILE_SJZL = "SJZL";

    /**
     * 基础安装
     */
    public static final String FILE_JCAZ = "JCAZ";

    /**
     * 支架安装
     */
    public static final String FILE_ZHIJIA_AZ = "ZHIJIA_AZ";

    /**
     * 组件安装
     */
    public static final String FILE_ZUJIA_AZ = "ZUJIA_AZ";

    /**
     * 配电、逆变器安装
     */
    public static final String FILE_PD_NBQ_AZ = "PD_NBQ_AZ";

    /**
     * 房产证明
     */
    public static final String FILE_FCZM = "FCZM";

    /**
     * 并网资料
     */
    public static final String FILE_BWZL = "BWZL";

    /**
     * 其他补充
     */
    public static final String FILE_PD_QTBC = "QTBC";


    /**
     * 预审信息 -- 信息使用授权书
     */
    public static final List<String> YSXX_FILE_LIST = Collections.singletonList(FILE_XXSYSQS_A);

    /**
     * 风险审查 -- 身份证照片、信息使用授权书、银行卡照片、房产证明
     */
    public static final List<String> FXSC_FILE_LIST = Arrays.asList(FILE_SFZ, FILE_XXSYSQS_B, FILE_YHK);

    /**
     * 农户投放 - 04 -- 房产证明、基础安装、支架安装、组件安装、配电、逆变器安装、房屋外部、房屋内部、设计资料
     */
    public static final List<String> NHTF_FILE_LIST_ONE = Arrays.asList(FILE_FCZM, FILE_JCAZ, FILE_ZHIJIA_AZ);
    public static final List<String> NHTF_FILE_LIST_TWO = Arrays.asList(FILE_ZUJIA_AZ, FILE_PD_NBQ_AZ, FILE_FWWB);
    public static final List<String> NHTF_FILE_LIST_THREE = Arrays.asList(FILE_FWNB, FILE_SJZL);

    public static final List<String> NHTF_FILE_LIST = Arrays.asList(FILE_FCZM, FILE_JCAZ, FILE_ZHIJIA_AZ,
            FILE_ZUJIA_AZ, FILE_PD_NBQ_AZ, FILE_FWWB, FILE_FWNB, FILE_SJZL);

    /**
     * 农户投放补充（并网） - 04-01 -- 并网资料、保险单照片
     */
    public static final List<String> BINGWANG_FILE_LIST = Arrays.asList(FILE_BWZL, FILE_BXD);



    /**--------------------------阿里云短信模板--------------------------------*/

    public static final String TEMPLATE_AUTH_CODE = "SMS_257795488";


    /**--------------------------重新提交任务类型--------------------------------*/
    /**
     * 重新进件
     */
    public static final String AGAIN_SYNCPROJECT = "AGAIN_SYNCPROJECT";
    /**
     * 重新投放
     */
    public static final String AGAIN_OPERATING_SIGN = "AGAIN_OPERATING_SIGN";
    /**
     * 重新投放补充
     */
    public static final String AGAIN_OPERATING_SIGN_UPDATE = "AGAIN_OPERATING_SIGN_UPDATE";

}
